﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 商品收藏(显示)
    /// </summary>
    public class ShopGoodsFavoriteDto : ShopGoodsFavoriteEditDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 所属用户ID
        /// </summary>
        [Display(Name = "所属用户")]
        public int UserId { get; set; }

        /// <summary>
        /// 商品标题
        /// </summary>
        [Display(Name = "商品标题")]
        [StringLength(512)]
        public string? Title { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        [Display(Name = "商品图片")]
        [StringLength(512)]
        public string? ImgUrl { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;
    }

    /// <summary>
    /// 商品收藏(编辑)
    /// </summary>
    public class ShopGoodsFavoriteEditDto
    {
        /// <summary>
        /// 所属商品ID
        /// </summary>
        [Display(Name = "所属商品")]
        public long GoodsId { get; set; }


    }
}
